package org.example.project3.Controller;

import org.example.project3.Result_.Result;
import org.example.project3.Utils.AlliOSS;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/bigevent/article")
public class FileUploadController {
    @PostMapping("/fileupload")
    public Result uploadfile(MultipartFile file) throws Exception {
        String imgurl = AlliOSS.upload(file);
        return Result.success(imgurl);
    }
}
